package com.tqjc.system.system.wrapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tqjc.business.interactivewithscan.uils.CommonUtils;
import com.tqjc.system.common.Wrapper.BaseWrapper;
import com.tqjc.system.common.enums.TaskStatusEnum;
import com.tqjc.system.system.entity.SysAddDetailTaskEntity;
import com.tqjc.system.system.entity.SysMaterialInfoEntity;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @description: 任务详情Wrapper
 * @Author: 86195
 * @Date: 2023/12/14 15:35
 **/
public class AddDetailTaskWrapper extends BaseWrapper<SysAddDetailTaskEntity> {


    public AddDetailTaskWrapper(List<SysAddDetailTaskEntity> paramList) {
        super(paramList);
        if(CollectionUtils.isNotEmpty(paramList)){

            List<SysAddDetailTaskEntity> resList = new ArrayList<>(paramList.size());
            for (SysAddDetailTaskEntity detailTaskEntity : paramList) {
                String status = detailTaskEntity.getStatus();
                detailTaskEntity.setStatus(TaskStatusEnum.getDescByStatus(status));
                resList.add(detailTaskEntity);
            }
        }
    }
}
